package jgl.vajra.management.part.mine.model;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.management.bean.HomeCarModelBean;
import jgl.vajra.management.bean.HomeMechanicsBean;
import jgl.vajra.management.part.mine.contract.CarAddContract;
import jgl.vajra.management.widget.manager.RxJavaHttpManager;
import jgl.vajra.management.widget.manager.retrofit.RetrofitJsonManager;

public class CarAddModel extends CarAddContract.Model{
    @Override
    public Observable<List<HomeMechanicsBean>> getCarTypeData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getCarTypeData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<List<HomeCarModelBean>> getCarModelData(Map<String, Object> mapCarModel) {
        return RetrofitJsonManager.getInstance().getApiService().getCarModelData(mapCarModel)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> getCarAddFeeData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getCarAddFeeData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
